Practical Dynamic Grammars for Dynamic Languages

نویسندگان

  • Lukas Renggli
  • Stéphane Ducasse
  • Tudor Gîrba
  • Oscar Nierstrasz
چکیده

Grammars for programming languages are traditionally specified statically. They are hard to compose and reuse due to ambiguities that inevitably arise. PetitParser combines ideas from scannerless parsing, parser combinators, parsing expression grammars and packrat parsers to model grammars and parsers as objects that can be reconfigured dynamically. Through examples and benchmarks we demonstrate that dynamic grammars are not only flexible but highly practical.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Program Execution Model Based on Generative Dynamic Grammars

The term “context-free grammar” invariably implies use of a static, unchanging set of grammar rules. When this constraint is removed, dynamic grammars result. In the past, use of dynamic grammars has been relegated to semantics work. However, we show that by defining and interpreting dynamic grammars appropriately, we can create a new grammar-based program execution model. This model unifies di...

متن کامل

A pure embedding of attribute grammars

Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes on demand. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented and functional program...

متن کامل

A Pure Object-Oriented Embedding of Attribute Grammars

Attribute grammars are a powerful specification paradigm for many language processing tasks, particularly semantic analysis of programming languages. Recent attribute grammar systems use dynamic scheduling algorithms to evaluate attributes by need. In this paper, we show how to remove the need for a generator, by embedding a dynamic approach in a modern, object-oriented programming language to ...

متن کامل

Dynamic Assessment: From Underlying Constructs to Implications for Language Teaching

Testing as a general trait of social life has received a great deal of attention by many language teachers and scholars. Throughout history, people have been tested to prove their abilities and experiences or to confirm their capacities. Many authorities have said that assessment and instruction should be integrated as a single and inseparable activity which seeks to understand development by a...

متن کامل

The Varieties of Programming Language Semantics And Their Uses

Formal descriptions of syntax are quite popular: regular and context-free grammars have become accepted as useful for documenting the syntax of programming languages, as well as for generating efficient parsers; attribute grammars allow parsing to be linked with typechecking and code generation; and regular expressions are extensively used for searching and transforming text. In contrast, forma...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010